import request from '@/utils/request'

// 获取大殿列表
export function listTempleHall() {
  return request({
    url: '/lotos/list/temple/hall',
    method: 'get'
  })
}

// 获取灯位信息
export function getLampPositions(templeId) {
  return request({
    url: `/lotos/lamp/positions/${templeId}`,
    method: 'get'
  })
}

// 提交供灯信息
export function submitLampOffering(data) {
  return request({
    url: '/api/lamp/offering',
    method: 'post',
    data
  })
}

export function getTemplateHall(params) {
  return request({
    url: '/lotos/get/temple/hall',
    method: 'get',
    params
  })
}
export function listPriceUnit(params) {
  return request({
    url: '/lotos/list/price/unit',
    method: 'get',
    params
  })
}
export function listLampType(params) {
  return request({
    url: '/lotos/list/lamp/type',
    method: 'get',
    params
  })
}
export function listBlessingWords(params) {
  return request({
    url: '/lotos/list/blessing/words',
    method: 'get',
    params
  })
}

export function genPayParams(data) {
  return request({
    url: '/lotos/gen/pay/order',
    method: 'post',
    data
  })
}

export function listUserOrder(params) {
  return request({
    url: '/order/list',
    method: 'get',
    params
  })
}

export function getSupplyingCnt(params) {
  return request({
    url: '/order/supplying/cnt',
    method: 'get',
    params
  })
}

export function getSupplyCntAndAmount(params) {
  return request({
    url: '/order/supply/cnt/and/amount',
    method: 'get',
    params
  })
}

export function getUserinfo(params) {
  return request({
    url: '/get/user/info',
    method: 'get',
    params
  })
}

export function updateUserThirdOpenid(data) {
  return request({
    url: '/update/third/openid',
    method: 'post',
    data
  })
}


